package com.slz3.business.module.configManagement.conIndexNewGoods.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conIndexNewGoods.domain.ConIndexNewGoods;
import com.slz3.business.module.configManagement.conIndexNewGoods.domain.ConIndexNewGoodsCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConIndexNewGoodsResAtomic {

    static Mono<ServerResponse> add_$ConIndexNewGoodsUpdateLock(ServerRequest req, ConIndexNewGoods conIndexNewGoods) {
        return ConIndexNewGoodsResSafeValid.add(req, conIndexNewGoods) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexNewGoodsResExecutor.add(req, conIndexNewGoods);
    }

    public static Mono<ServerResponse> delete_$ConIndexNewGoodsUpdateLock(ServerRequest req, ConIndexNewGoodsCondition conIndexNewGoodsCondition) {
        return ConIndexNewGoodsResSafeValid.delete(req, conIndexNewGoodsCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexNewGoodsResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$ConIndexNewGoodsUpdateLock(ServerRequest req, ConIndexNewGoods conIndexNewGoods) {
        return ConIndexNewGoodsResSafeValid.modify(req, conIndexNewGoods) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexNewGoodsResExecutor.modify(req, conIndexNewGoods);
    }

    static Mono<ServerResponse> info_$ConIndexNewGoodsUpdateLock(ServerRequest req) {
        return ConIndexNewGoodsResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexNewGoodsResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$ConIndexNewGoodsUpdateLock(ServerRequest req, ConIndexNewGoodsCondition conIndexNewGoodsCondition) {
        return ConIndexNewGoodsResSafeValid.auditSubmit(req, conIndexNewGoodsCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexNewGoodsResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$ConIndexNewGoodsUpdateLock(ServerRequest req, ConIndexNewGoodsCondition conIndexNewGoodsCondition) {
        return ConIndexNewGoodsResSafeValid.audit(req, conIndexNewGoodsCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexNewGoodsResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$ConIndexNewGoodsUpdateLock(ServerRequest req, ConIndexNewGoodsCondition conIndexNewGoodsCondition) {
        return ConIndexNewGoodsResSafeValid.auditReject(req, conIndexNewGoodsCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexNewGoodsResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$ConIndexNewGoodsUpdateLock(ServerRequest req, ConIndexNewGoodsCondition conIndexNewGoodsCondition) {
        return ConIndexNewGoodsResSafeValid.usingEnable(req, conIndexNewGoodsCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexNewGoodsResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$ConIndexNewGoodsUpdateLock(ServerRequest req, ConIndexNewGoodsCondition conIndexNewGoodsCondition) {
        return ConIndexNewGoodsResSafeValid.usingDisable(req, conIndexNewGoodsCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexNewGoodsResExecutor.usingDisable(req);
    }
}
